/***作为公共模块****/
import { defineStore } from 'pinia'
export const commonStore = defineStore('common', {
  state: () => {
    return{
      cityInfo:{},
      locationAuthorization:null,
      richText:{},
      shopStoreIndex:{},//距离最近店铺的信息
    }
  },
  actions: {
    setCityInfo(cityInfo){
      this.cityInfo = cityInfo
    },
    setLocationAuthorization(data){
      this.locationAuthorization = data
    },
    setRichText(data){
      this.richText = data
    },
    setShopStoreIndex(data){
      // console.log('setShopStoreIndex',data)
      this.shopStoreIndex = data
      console.log('this.shopStoreIndex',this.shopStoreIndex)
    }
  },
  getters: {
    getLocationAuthorization: (state) => {
      return state.locationAuthorization
    }
  }
})
